﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace DataProvider
{
    public static class Extensions
    {
        public static MethodInfo GetOrSetMethod(this PropertyInfo info)
        {
            if (info.GetGetMethod() != null)
                return info.GetGetMethod();
            else if (info.GetMethod != null)
                return info.GetMethod;
            else if (info.GetSetMethod() != null)
                return info.GetSetMethod();
            else if (info.SetMethod != null)
                return info.SetMethod;
            return null;
        }
    }
}
